package com.antovita.militarymonkey.screens;

import com.antovita.militarymonkey.MyGdxGame;
import com.antovita.militarymonkey.input.ChoiceMenuInput;
import com.antovita.militarymonkey.service.Textures;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Rectangle;

public abstract class ChoiceMenuScreen extends Screen {
	
	protected SpriteBatch batch;
	private Sprite back;
	
	public ChoiceMenuScreen(MyGdxGame gdxGame) {
		super(gdxGame);
		this.input = new ChoiceMenuInput(gdxGame);
		batch = new SpriteBatch();
		
		Textures.loadSprites("data/back.png", 1, 1);
		back = new Sprite(Textures.getTextureRegions("data/back.png")[0]);
		back.setSize(WIDTH * 0.5f, HEIGHT * 0.1f);
		back.setPosition(WIDTH * 0.25f, HEIGHT * 0.05f);
	}
	
	@Override
	public void render() {
		Gdx.gl.glClearColor(0.733f, 0.867f, 0.875f, 1); // 187 221 223
		Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
		batch.begin();
		back.draw(batch);
		batch.end();
	}
	
	public Rectangle getBack() {
		return back.getBoundingRectangle();
	}
}
